<!--
1. 在js 的for (item,i) in list 中, item指的是list[i], i是索引值
2. 用v-for 遍历普通数组、对象数组、对象属性、数字
3. 在js 中用for (value,key,index) in obj 遍历对象的时候，三个量分别是 值，键，索引
4.
-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <p v-for="(item,i) in list">{{item}}</p>
        <p v-for="item in objList">{{item.id}}--{{item.name}}</p>
        <p v-for="(value,key,index) in obj">{{index}}:{{key}}:{{value}}</p>
        <p v-for="i in 10">{{i}}</p>
    </div>
    <script>
        var vm=new Vue({
            el:"#app",
            data:{
                list: [1,2,3,4,5,6],
                objList:[
                    {id:1,name:'zmj1'},
                    {id:2,name:'zmj2'},
                    {id:3,name:'zmj3'},
                    {id:4,name:'zmj4'}
                ],
                obj:{name:'zmj',age:18}
            },
            methods:{

            }
        })
    </script>
</body>
</html>